<template>
  <div class="table_coent">
    <div class="table_left">
      <el-table :data="tableData" border style="width:100%; height: 20">
        <el-table-column prop="ID" label="ID" width="70"> </el-table-column>
        <el-table-column prop="Code" label="Code" width="70"> </el-table-column>
        <el-table-column prop="X" label="x(cm)" width="70"> </el-table-column>
        <el-table-column prop="Y" label="y(cm)" width="70"> </el-table-column>
        <el-table-column prop="Pat" label="Pat" width="70"> </el-table-column>
        <el-table-column prop="Area" label="Area" width="70"> </el-table-column>
      </el-table>
    </div>

    <!-- <div class="table_right">
      <el-table :data="Data" border style="width: 100%; height: 20">
        <el-table-column prop="date" label="" width="110"> </el-table-column>
        <el-table-column prop="name" label="当前值" width="110">
        </el-table-column>
        <el-table-column prop="co" label="低阀值" width="80">
        </el-table-column>
        <el-table-column prop="address" label="高阀值" width="80">
        </el-table-column>
      </el-table>
    </div> -->  
  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData: [
        // {
        //   date: "1",
        //   name: "sc",
        //   address: "8.8",
        // },
        // {
        //   date: "2",
        //   name: "sc",
        //   address: "8.8",
        // },
        // {
        //   date: "2",
        //   name: "sc",
        //   address: "8.8",
        // },
      ],
      Data: [
        {
          date: "连续出现次数",
          name: "1",
          address: "8.8",
          co: "2",
        },
        {
          date: "区域缺陷密度",
          name: "2",
          address: "8.8",
          co: "3",
        },
        {
          date: "区域缺陷面积",
          name: "2.17",
          address: "8.8",
          co: "4",
        },
      ],
    };
  },
  sockets: {
    alysislen(data) {
      if (data.length == 0) {
        this.$alert("查询结果未能返回，请重新输入", "消息提示", {
          confirmButtonText: "确定",
          callback: (action) => {
            this.$message({
              type: "info",
              message: `action: ${action}`,
            });
          },
        });
      } else {
        let tempdata = JSON.parse(data);
        this.tableData = tempdata.table2;
      }
    },
  },
  methods: {},
  mounted() {
      let data = sessionStorage.getItem("tempdata");
      let dataquery = JSON.parse(data);
      this.tableData = dataquery.table2;   
      // console.log(this.tableData)
  },
};
</script>

<style  scoped>
/* .table_coent { */
  /* display: flex;
  justify-content: space-between;
  align-items: center; */
/* } */
.table_left {
  width: 100%;
  /* border: 1px solid red; */
}
.table_right {
  width: 49%;
  /* border: 1px solid lue; */
}
</style>